'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('Setups', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      name: {
        allowNull: false,
        type: Sequelize.STRING(30),
        defaultValue: ''
      },
      title: {
        allowNull: false,
        type: Sequelize.STRING(50),
        defaultValue: ''
      },
      brief: {
        allowNull: false,
        type: Sequelize.STRING(255),
      },
      remark: {
        allowNull: false,
        type: Sequelize.STRING(255),
      },
      extra: {
        allowNull: false,
        type: Sequelize.STRING(255),
        defaultValue: ''
      },
      type: {
        allowNull: false,
        type: Sequelize.INTEGER(1),
        defaultValue: '0'
      },
      status: {
        allowNull: false,
        type: Sequelize.INTEGER(1),
        defaultValue: '0'
      },
      group: {
        allowNull: false,
        type: Sequelize.INTEGER(1),
        defaultValue: '0'
      },
      sort: {
        allowNull: false,
        type: Sequelize.INTEGER(1),
        defaultValue: '0'
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE,
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE,
      },
      deletedAt: {
        type: Sequelize.DATE,
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('Setups');
  }
};